<extend name="Index/index"/>

<block name="content">
    <!--<div class="view-product" style="margin-top: 50px">-->
        <div class="info-center">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">{{$title}}</h6>
            </div>
            <div class="offcial-table input-table table-margin clearfix">

                <if condition="$list eq null">
                    <div class="tr non-info show border-bottom-none">
                        <span>没查询到符合条件的记录</span>
                    </div>
                    <else />
                    <table class="layui-table text-center">
                        <tr>
                            <th class="text-center">记录ID</th>
                            <th class="text-center">ID</th>
                            <th class="text-center">捐款人</th>
                            <th class="text-center">金额</th>
                            <th class="text-center">项目名称</th>
                        </tr>
                        <php>$i = 1;</php>
                        <foreach  name="list" item="vo" key="k">
                            <tr>
                                <td>{{$i}}</td>
                                <td>{{$vo.id}}</td>
                                <php>$i++;</php>
                                <td>{{$vo.name}}</td>
                                <td>{{$vo.price}}</td>
                                <td>{{$vo.item}}</td>
                            </tr>

                        </foreach>
                        <tr>
                            <td colspan="5"><div class="sabrosus">{{$page}}</div></td>
                        </tr>
                    </table>

                </if>

            </div>
        </div>
    <!--</div>-->
    <script>
        $(".time").each(function(){
            //获得指定时间的时间戳
            $time = Date.parse(new Date($(this).text()));
            //获得现在的时间戳
            $nowTime = Date.parse(new Date());
            if($time > $nowTime){
                $(this).next().append("<b style='color: #00ff00;'>正在进行中</b>");
            }else{
                $(this).next().append("<b style='color: #ff0000;'>已截止</b>");
            }
        })
    </script>
</block>